<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>elFinder Source PHP</title>
	
	<script src="../js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>

	
	<link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
	
	<link rel="stylesheet" href="css/elfinder.css" type="text/css" media="screen" title="no title" charset="utf-8">

	<script src="js/elFinder.js"               type="text/javascript" charset="utf-8"></script>
	<script src="js/elFinder.view.js"          type="text/javascript" charset="utf-8"></script>
	<script src="js/elFinder.ui.js"            type="text/javascript" charset="utf-8"></script>
	<script src="js/elFinder.quickLook.js"     type="text/javascript" charset="utf-8"></script>
	<script src="js/elFinder.eventsManager.js" type="text/javascript" charset="utf-8"></script>

	<script src="js/i18n/elfinder.ru.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.cs.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.el.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.es.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.fr.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.hu.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.it.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.lv.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.nl.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.pl.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.uk.js"    type="text/javascript" charset="utf-8"></script>
	<script src="js/i18n/elfinder.zh_TW.js" type="text/javascript" charset="utf-8"></script>
	
	<style type="text/css">
		#close, #open, #dock, #undock, #destroy {
			width: 100px;
			position:relative;
			display: -moz-inline-stack;
			display: inline-block;
			vertical-align: top;
			zoom: 1;
			*display: inline;
			margin:0 3px 3px 0;
			padding:1px 0;
			text-align:center;
			border:1px solid #ccc;
			background-color:#eee;
			margin:1em .5em;
			padding:.3em .7em;
			border-radius:5px; 
			-moz-border-radius:5px; 
			-webkit-border-radius:5px;
			cursor:pointer;
		}
	</style>
	

	<script type="text/javascript" charset="utf-8">
		$().ready(function() {
			var f = $('#finder').elfinder({
				url : 'connectors/php/connector.php',
				lang : 'ru',
				docked : true,
				// editorCallback : function(url) { window.console.log(url) },
				// closeOnEditorCallback : false,
				selectMultiple : true,
				dialog : {
					title : 'File manager',
					height : 500
				}
			})

			// window.console.log(f)

			$('#close,#open,#dock,#undock,#destroy').click(function() {
				$('#finder').elfinder($(this).attr('id'));
			})
			
			$('#mkdir').click(function(e) {
				e.stopPropagation();
				e.preventDefault();
				
				window.console.log(f[0].elfinder)
				f[0].elfinder.ui.exec('mkdir')
			})
			
			// var opts = {
			// 	url : 'connectors/php/connector.php',
			// 	lang : 'ru',
			// 	// editorCallback : function(url) { window.console.log(url) },
			// 	closeOnEditorCallback : true,
			// 	dialog : {
			// 		title : 'File manager',
			// 		height : 500
			// 	}
			// }
			// 
			// $('#i1,#i2').click(function() {
			// 	var t = $(this),
			// 		id = t.attr('id')+'_elfinder',
			// 		f = $('#'+id);
			// 		
			// 	$('.my-elfinder').elfinder('close')	
			// 		
			// 	if (f.length) {
			// 		f.elfinder('open')
			// 	} else {
			// 		$('<div class="my-elfinder" id="'+id+'"/>').elfinder($.extend({}, opts, { editorCallback : function(url) { t.val(url).focus() } }))
			// 	}
			// 		
			// })
			
		})
	</script>

</head>
<body>
	<a href="#" id="mkdir">mkdir</a>
	<div id="open">open</div><div id="close">close</div><div id="dock">dock</div><div id="undock">undock</div>
	<div id="finder">finder</div>
	<input type="text" value="123" />
	
	
	<!-- <div><input type="text" id="i1"></div> -->
	<!-- <div><input type="text" id="i2"></div> -->

	

</body>
</html>
